package feign.controller;

import feign.service.FeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/hystrix-client")
public class HystrixFeignController {
    @Resource
    private FeignService feignService;

    @GetMapping(value = "/service/monitor/env")
    public String serviceMonitorEn(@RequestParam(value="sleep", defaultValue = "0") Long sleep) {
        return feignService.serviceMonitorEnv(sleep);
    }
}
